Skip to content

chore: update automation script to run locally - #2650

Open
nschonni wants to merge 1 commit into
nodejs:mainfrom
nschonni:build-automation-cleanup
Open

nschonni wants to merge 1 commit into
nodejs:mainfrom
nschonni:build-automation-cleanup

Conversation

@nschonni

@nschonni nschonni commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

Description

Took the concepts from #2581 and was able to simplify it further, now that there isn't a different source for the built versions.

Motivation and Context

This is another incremental step that should be the last one before the update.sh/function.sh scripts can be removed.

  • Use ShellJS for better GitBash compat than process spawn calls for remaining update.sh use
  • Use the GItHub Action library to pass/set the ENV for the GitHub Action
  • Add additional logging for local troubleshooting

Testing Details

  1. Run npm ci to get new dependencies
  2. Run npm run build and see there should only be printed messages about the images beting up-to-date
  3. Edit the first Alpine Dockerfile for any or multiple versions to a newer or older patch number
  4. Run npm run build
  5. There may be some cd messages, but all the edited Alpine Dockerfiles (or other Dockeriles) should be reverted to the latest

Example Output(if appropriate)

Types of changes

  • Documentation
  • Version change (Update, remove or add more Node.js versions)
  • Variant change (Update, remove or add more variants, or versions of variants)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Other (none of the above)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING.md document.
  • All new and existing tests passed.

@nschonni
nschonni marked this pull request as draft October 10, 2026 18:58
@nschonni
nschonni force-pushed the build-automation-cleanup branch from 76728ab to 8145566 Compare October 10, 2026 19:00
@nschonni
nschonni marked this pull request as ready for review October 10, 2026 19:10
@nschonni

Copy link
Copy Markdown
Member Author

Created 2 other branches just to do some "tests"

@nschonni
nschonni requested a review from a team October 10, 2026 19:19
@nschonni nschonni mentioned this pull request Oct 10, 2026
12 tasks

@MikeMcC399 MikeMcC399 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use versions.json as the source of truth for which Node.js release lines are active?

@nschonni
nschonni force-pushed the build-automation-cleanup branch 2 times, most recently from 35fdcc3 to 9d7f39f Compare October 13, 2026 22:03
@nschonni

Copy link
Copy Markdown
Member Author

Good idea, I've changed that and cleaned up some of th ENV parts.
That GitHub thing to set the env appears to just be a print message to the log ::set-env name=NODE_PR_TITLE::feat: Node.js v26.11.1, so it could probably be inlined without taking on the dependency

The JSON parsing is a little hacky. Might be better to change the versions.json to an array with typed classes later, but doesn't make sense to make that change with this

@nschonni
nschonni force-pushed the build-automation-cleanup branch 2 times, most recently from fcf1c34 to df210e4 Compare October 14, 2026 22:07
@nschonni

Copy link
Copy Markdown
Member Author

Opend #2659 as a draft to share the follow-on ideas for the migration, but that could just replace this too.

@nschonni
nschonni requested review from a team and MikeMcC399 October 19, 2026 19:38

@SimenB SimenB left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

- Use ShellJS for better GitBash compat than process spawn calls for remaining `update.sh` use
- Use the GItHub Action library to pass/set the ENV for the GitHub Action
- Add additional logging for local troubleshooting
@nschonni
nschonni force-pushed the build-automation-cleanup branch from df210e4 to 13cc253 Compare October 21, 2026 18:11
@nschonni

Copy link
Copy Markdown
Member Author

Gave this a rebase, but didn't do it on the follow-on PR yet

@MikeMcC399

Copy link
Copy Markdown
Contributor

How can this be tested? I tried dropping the security release and then running npm run build, but I was seeing error messages. Does it always need to be run through GitHub Actions? The section "Testing Details" in the PR is empty.

$ npm run build

> build
> node build-automation.mjs

Found major versions in versions.json: 22, 24, 26
Grabbing Index.json files
Checking for updates for 22
        Read version v22.23.3 from alpine3.23
        Found new version v22.23.4, released on 2026-10-20!
        Running 'bash update.sh 22'.
update.sh: line 46: cd: update.sh: Not a directory
update.sh: line 46: cd: null directory
Checking for updates for 24
        Read version v24.22.0 from alpine3.23
        Found new version v24.22.1, released on 2026-10-20!
        Running 'bash update.sh 24'.
update.sh: line 46: cd: update.sh: Not a directory
update.sh: line 46: cd: null directory
Checking for updates for 26
        Read version v26.12.0 from alpine3.23
        Found new version v26.12.1, released on 2026-10-21!
        Running 'bash update.sh 26'.
update.sh: line 46: cd: update.sh: Not a directory
update.sh: line 46: cd: null directory
::set-env name=NODE_PR_TITLE::feat: Node.js v22.23.4, v24.22.1, v26.12.1
PR will be created with title 'feat: Node.js v22.23.4, v24.22.1, v26.12.1'

@nschonni

nschonni commented Oct 22, 2026 •

Copy link
Copy Markdown
Member Author

@MikeMcC399 filled in the Testing Details, but I think it's the same steps you were following. I'm going to rebase on top of the security releases, so this should be a no-op again

@MikeMcC399

Copy link
Copy Markdown
Contributor

So what about the messages? Are they to be expected?

update.sh: line 46: cd: update.sh: Not a directory
update.sh: line 46: cd: null directory

@nschonni

Copy link
Copy Markdown
Member Author

So what about the messages? Are they to be expected?

update.sh: line 46: cd: update.sh: Not a directory
update.sh: line 46: cd: null directory

"Expected" in the sense that it still appears to be doing the work despite the message. The follow-on PR removes the rest of the bash, and it becomes a non-issue again

@MikeMcC399

Copy link
Copy Markdown
Contributor

Do you want to merge this in now? There should be a Node.js 26.x release on 2026-10-28 when it transitions to LTS, so that would be a good live test quite soon.

Would your other PR #2659 also be ready by then to finish things off?

@nschonni

Copy link
Copy Markdown
Member Author

The other one just needs a rebase, since the first commit is just this one. I kept them separate in case there was a preference by the team to do the small steps, but this could just use the other one as the "big bang"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants